using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class UploadHDHeadImgResponse : GeneratedMessageLite<UploadHDHeadImgResponse, UploadHDHeadImgResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<UploadHDHeadImgResponse, UploadHDHeadImgResponse.Builder>
		{
			private bool resultIsReadOnly;
			private UploadHDHeadImgResponse result;
			protected override UploadHDHeadImgResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override UploadHDHeadImgResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override UploadHDHeadImgResponse DefaultInstanceForType
			{
				get
				{
					return UploadHDHeadImgResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint TotalLen
			{
				get
				{
					return this.result.TotalLen;
				}
				set
				{
					this.SetTotalLen(value);
				}
			}
			public uint StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public string FinalImgMd5Sum
			{
				get
				{
					return this.result.FinalImgMd5Sum;
				}
				set
				{
					this.SetFinalImgMd5Sum(value);
				}
			}
			public Builder()
			{
				this.result = UploadHDHeadImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(UploadHDHeadImgResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private UploadHDHeadImgResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					UploadHDHeadImgResponse other = this.result;
					this.result = new UploadHDHeadImgResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override UploadHDHeadImgResponse.Builder Clear()
			{
				this.result = UploadHDHeadImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override UploadHDHeadImgResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new UploadHDHeadImgResponse.Builder(this.result);
				}
				return new UploadHDHeadImgResponse.Builder().MergeFrom(this.result);
			}
			public override UploadHDHeadImgResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override UploadHDHeadImgResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is UploadHDHeadImgResponse)
				{
					return this.MergeFrom((UploadHDHeadImgResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override UploadHDHeadImgResponse.Builder MergeFrom(UploadHDHeadImgResponse other)
			{
				return this;
			}
			public override UploadHDHeadImgResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override UploadHDHeadImgResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(UploadHDHeadImgResponse._uploadHDHeadImgResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = UploadHDHeadImgResponse._uploadHDHeadImgResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasTotalLen = input.ReadUInt32(ref this.result.totalLen_);
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasStartPos = input.ReadUInt32(ref this.result.startPos_);
							continue;
						}
						if (num3 == 34u)
						{
							this.result.hasFinalImgMd5Sum = input.ReadString(ref this.result.finalImgMd5Sum_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public UploadHDHeadImgResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public UploadHDHeadImgResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public UploadHDHeadImgResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public UploadHDHeadImgResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public UploadHDHeadImgResponse.Builder SetTotalLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = true;
				this.result.totalLen_ = value;
				return this;
			}
			public UploadHDHeadImgResponse.Builder ClearTotalLen()
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = false;
				this.result.totalLen_ = 0u;
				return this;
			}
			public UploadHDHeadImgResponse.Builder SetStartPos(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public UploadHDHeadImgResponse.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0u;
				return this;
			}
			public UploadHDHeadImgResponse.Builder SetFinalImgMd5Sum(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasFinalImgMd5Sum = true;
				this.result.finalImgMd5Sum_ = value;
				return this;
			}
			public UploadHDHeadImgResponse.Builder ClearFinalImgMd5Sum()
			{
				this.PrepareBuilder();
				this.result.hasFinalImgMd5Sum = false;
				this.result.finalImgMd5Sum_ = "";
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int TotalLenFieldNumber = 2;
		public const int StartPosFieldNumber = 3;
		public const int FinalImgMd5SumFieldNumber = 4;
		private static readonly UploadHDHeadImgResponse defaultInstance;
		private static readonly string[] _uploadHDHeadImgResponseFieldNames;
		private static readonly uint[] _uploadHDHeadImgResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasTotalLen;
		private uint totalLen_;
		private bool hasStartPos;
		private uint startPos_;
		private bool hasFinalImgMd5Sum;
		private string finalImgMd5Sum_ = "";
		private int memoizedSerializedSize = -1;
		public static UploadHDHeadImgResponse DefaultInstance
		{
			get
			{
				return UploadHDHeadImgResponse.defaultInstance;
			}
		}
		public override UploadHDHeadImgResponse DefaultInstanceForType
		{
			get
			{
				return UploadHDHeadImgResponse.DefaultInstance;
			}
		}
		protected override UploadHDHeadImgResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint TotalLen
		{
			get
			{
				return this.totalLen_;
			}
		}
		public uint StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public string FinalImgMd5Sum
		{
			get
			{
				return this.finalImgMd5Sum_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasTotalLen && this.hasStartPos && this.BaseResponse.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasTotalLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.TotalLen);
				}
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.StartPos);
				}
				if (this.hasFinalImgMd5Sum)
				{
					num += CodedOutputStream.ComputeStringSize(4, this.FinalImgMd5Sum);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private UploadHDHeadImgResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] uploadHDHeadImgResponseFieldNames = UploadHDHeadImgResponse._uploadHDHeadImgResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, uploadHDHeadImgResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasTotalLen)
			{
				output.WriteUInt32(2, uploadHDHeadImgResponseFieldNames[3], this.TotalLen);
			}
			if (this.hasStartPos)
			{
				output.WriteUInt32(3, uploadHDHeadImgResponseFieldNames[2], this.StartPos);
			}
			if (this.hasFinalImgMd5Sum)
			{
				output.WriteString(4, uploadHDHeadImgResponseFieldNames[1], this.FinalImgMd5Sum);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasTotalLen)
			{
				num ^= this.totalLen_.GetHashCode();
			}
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasFinalImgMd5Sum)
			{
				num ^= this.finalImgMd5Sum_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			UploadHDHeadImgResponse uploadHDHeadImgResponse = object_0 as UploadHDHeadImgResponse;
			return uploadHDHeadImgResponse != null && (this.hasBaseResponse == uploadHDHeadImgResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(uploadHDHeadImgResponse.baseResponse_))) && (this.hasTotalLen == uploadHDHeadImgResponse.hasTotalLen && (!this.hasTotalLen || this.totalLen_.Equals(uploadHDHeadImgResponse.totalLen_))) && (this.hasStartPos == uploadHDHeadImgResponse.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(uploadHDHeadImgResponse.startPos_))) && (this.hasFinalImgMd5Sum == uploadHDHeadImgResponse.hasFinalImgMd5Sum && (!this.hasFinalImgMd5Sum || this.finalImgMd5Sum_.Equals(uploadHDHeadImgResponse.finalImgMd5Sum_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<UploadHDHeadImgResponse, UploadHDHeadImgResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<UploadHDHeadImgResponse, UploadHDHeadImgResponse.Builder>.PrintField("TotalLen", this.hasTotalLen, this.totalLen_, writer);
			GeneratedMessageLite<UploadHDHeadImgResponse, UploadHDHeadImgResponse.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<UploadHDHeadImgResponse, UploadHDHeadImgResponse.Builder>.PrintField("FinalImgMd5sum", this.hasFinalImgMd5Sum, this.finalImgMd5Sum_, writer);
		}
		public static UploadHDHeadImgResponse ParseFrom(byte[] data)
		{
			return UploadHDHeadImgResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private UploadHDHeadImgResponse MakeReadOnly()
		{
			return this;
		}
		public static UploadHDHeadImgResponse.Builder CreateBuilder()
		{
			return new UploadHDHeadImgResponse.Builder();
		}
		public override UploadHDHeadImgResponse.Builder ToBuilder()
		{
			return UploadHDHeadImgResponse.CreateBuilder(this);
		}
		public override UploadHDHeadImgResponse.Builder CreateBuilderForType()
		{
			return new UploadHDHeadImgResponse.Builder();
		}
		public static UploadHDHeadImgResponse.Builder CreateBuilder(UploadHDHeadImgResponse prototype)
		{
			return new UploadHDHeadImgResponse.Builder(prototype);
		}
		static UploadHDHeadImgResponse()
		{
			UploadHDHeadImgResponse.defaultInstance = new UploadHDHeadImgResponse().MakeReadOnly();
			UploadHDHeadImgResponse._uploadHDHeadImgResponseFieldNames = new string[]
			{
				"BaseResponse",
				"FinalImgMd5sum",
				"StartPos",
				"TotalLen"
			};
			UploadHDHeadImgResponse._uploadHDHeadImgResponseFieldTags = new uint[]
			{
				10u,
				34u,
				24u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.UploadHDHeadImgResponse.Descriptor, null);
		}
	}
}
